﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace Twi.COMMON.WCF
{
    public class StringEqualityComparer : IEqualityComparer<string>
    {
        private Func<string, string, bool> _makeComparison;
       
        public StringEqualityComparer(Func<string, string, bool> makeComparison)
        {
            _makeComparison = makeComparison;
        }

        #region IEqualityComparer<string> Members

        public bool Equals(string x, string y)
        {
            return _makeComparison(x, y);
        }

        public int GetHashCode(string obj)
        {
            return 1;
        }

        #endregion
    }
}
